export const formatDate = (date: string | number, precise: boolean = false) => {
  const _date = new Date(+date);
  const str = `${_date.getFullYear()}-${
    _date.getMonth() + 1
  }-${_date.getDate()} ${_date.getHours()}:${_date.getMinutes()}:${_date.getSeconds()}`;

  return precise ? str : str.split(" ")[0];
};
